{template header}
<link rel="stylesheet" href="static/calendar/js/calendar.css" />
<script type="text/javascript" charset="utf-8" src="static/calendar/calendar.php"></script>
<h4 style="padding-left:10px;;">搜索 <i class="icon-search"></i></h4>
<form class="form-horizontal clearfix form-inline" method="post" action="">

    <div class="control-group" style="float: left;margin-bottom:10px">
        <label class="control-label" for="inputaddtime">开始时间：</label>
        <div class="controls">
            <input type="text" name="stime" readonly="readonly" id="add_time_id" value="{eval echo date('Y-m-d H:i:s',(time()-86400*3))}">
            <input name="add_time_btn" type="button" id="add_time_btn" onclick="return showCalendar('add_time_id', '%Y-%m-%d %H:%M:%S', '24', false, 'add_time_id');" value="选择" class="button" id="add_time_id"/>
        </div>
    </div>
    <div class="control-group"  style="margin-bottom:10px">
        <label class="control-label" for="inputaddtime">结束时间：</label>
        <div class="controls">
            <input type="text" name="etime" readonly="readonly" id="add_time_ids" value="{eval echo date('Y-m-d H:i:s')}">
            <input name="add_time_btn" type="button" id="add_time_btn2" onclick="return showCalendar('add_time_ids', '%Y-%m-%d %H:%M:%S', '24', false, 'add_time_ids');" value="选择" class="button" id="add_time_ids"/>
        </div>
    </div>
    <div class="control-group" style="margin-bottom:10px">
        <label class="control-label" >群ID：</label>
        <div class="controls">
            <textarea style="width: 320px" name="gids" placeholder="多个之间用（,）号隔开，例：10432,10344"></textarea>
        </div>
    </div>
    <div class="control-group search-group" style="margin-bottom:10px">
        <div class="controls">
            <button class="btn" type="submit">提交</button>　
            <button class="btn" type="reset">重置</button>
        </div>
    </div>
</form>
<br/>
<div class="bs-docs-example table-align" style="clear:both;">
    <table class="table table-striped">
        <thead>
        <tr>
            <th width="80">群组ID</th>
            <th >群组名称</th>
            <th >群组人数</th>
            <th width="80">跑步总里程</th>
            <th>跑步总人数</th>
            <th>人均跑量</th>
            <th >活动数</th>
            <th>TOP10人均跑量</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        {loop $groupList $k $v}
        <tr>
            <td>{$v['gid']}</td>
            <td><a href="?c=admin&a=GroupStatistic&gid=$v['gid']">{$v['name']}</a></td>
            <td>{$v['members']}</td>
            <td>{$v['s']}</td>
            <td>{$v['runNum']}</td>
            <td>{$v['avg']}</td>
            <td><code>普通：{$v['activityCount']}</code> <code>官：{$v['officeActivityCount']}</span></td>
            <td>{$v['topAvg']}</td>
            <td><a class="btn btn-primary" href="?c=admin&a=groupTOP&gid={$v['gid']}&stime={$stime}&etime={$etime}">TOP10</a></td>
        </tr>
        {/loop}
        </tbody>
    </table>
</div>
<div class="pagination">
    <ul>
        {$pageStr}
    </ul>
</div>
{template footer}
